// ************** ports.c ********************

#include "inc/hw_types.h"
#include "lm3s8962.h"
#include "driverlib/gpio.h"
#include "driverlib/sysctl.h"
#include "inc/hw_memmap.h"

#define PORT_PERIPH_ENABLE        SYSCTL_PERIPH_GPIOE
#define PORT_BASE                 GPIO_PORTE_BASE
#define PORT_PINS                 GPIO_PIN_1
#define HW_PORT                   GPIO_PORTE_DATA_R
#define PIN_MASK                  0x02

void Ports_Init_DigOut (void) {
    //  Enable port
  SysCtlPeripheralEnable(PORT_PERIPH_ENABLE);
    // Configure Pad
  GPIOPadConfigSet(PORT_BASE, PORT_PINS, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
    // Set Direction
  GPIODirModeSet(PORT_BASE, PORT_PINS, GPIO_DIR_MODE_OUT);
    // Configure as a GPIO input
  GPIOPinTypeGPIOOutput(PORT_BASE, PORT_PINS);
    // Set Pin Low
  HW_PORT &= ~PIN_MASK;
}
